package com.tom.imooc.staticdatasource.service.impl;

import com.tom.imooc.staticdatasource.DynamicDataSource;
import com.tom.imooc.staticdatasource.JdbcUtil;
import com.tom.imooc.staticdatasource.service.UserService;

/**
 * @Author Tim
 * @Description:
 * @Version 1.0
 */
public class UserServiceImpl implements UserService {

    @DynamicDataSource(db = "test_user")
    @Override
    public void addUser(String username) {
        JdbcUtil.executeSql("insert into user(name) values(?)", username);
    }
}
